<!--<template>-->
<!--    -->
<!--</template>-->

<!--<script>-->
<!--  export default {-->
<!--    name: 'comTitle'-->
<!--  }-->
<!--</script>-->

<!--<style scoped>-->

<!--</style>-->

//comTitle.vue
<template>
  <div class="title-common">
    <div class="title">
      <span :class="[titleSize]" v-text="title"/>
      <span class="title-sub" v-if="subTitle" v-text="subTitle"/>
    </div>
    <slot></slot>
  </div>
</template>
<script>
  export default {
    props: {
      size: {
        type: String,
        default: "normal"
      },
      //标题
      title: {
        type: String,
        required: true
      },
      //小标题说明
      subTitle: {
        type: String,
        default: ""
      }
    },
    computed: {
      titleSize() {
        return `title-${this.size}`;
      }
    }
  };
</script>
<style lang="postcss" scoped>

</style>
